<template>
	<view class="p20">
		<view class="p20 bag--fff br--20">
			<view class="f20 fw">
				{{listwork.title}}
			</view>
			<view class="flex a-center mt50" v-if="lll">
				<view class="cred f15 f1">
					{{listwork.salary}}
					<span class=" ml10 ">{{listwork.salary_unit_name}}</span>
				</view>
				<view class="f12 co--999">
					{{listwork.create_time}}
				</view>
			</view>
			<view class="flex a-center mt50" v-else>
				<view class="cred f15 f1">
					{{listwork.salary_low}} ~ {{listwork.salary_high}}
					<span class=" ml10 ">元/月</span>
				</view>
				<view class="f12 co--999">
					{{listwork.modified_at}}
				</view>
			</view>
			<view class="flex a-center mt50">
				<view class="co--7676 f12 flex a-center">
					<image src="../../static/gps.png" mode="" class="img14"></image>
					<view class="" style="margin-left: 6rpx;">
						{{listwork.service_city_name}}
					</view>
				</view>
				<view class="co--7676 f12 flex a-center ml50">
					<image src="../../static/mani.png" mode="" class="img14"></image>
					<view class="" style="margin-left: 6rpx;">
						日结
					</view>
				</view>
				<view class="co--7676 f12 flex a-center ml50">
					<image src="../../static/ren.png" mode="" class="img14"></image>
					<view class="" style="margin-left: 6rpx;">
						{{listwork.num}}人
					</view>
				</view>
			</view>
		</view>
		<view class="p20 bag--fff br--20 mt20">
			<view class="f14 fw">
				职位描述
			</view>
			<view class="f14 hg-48 mt30">
				{{listwork.content}}
			</view>
		</view>
		<view class="p20 bag--fff br--20 mt20">
			<view class="f14 fw">
				联系方式
			</view>
			<view class="flex mt40">
				<image src="../../static/shi.png" mode="" class="img38"></image>
				<view class="ml30">
					<view class="f14 fw">
						{{listwork.company_name}}
					</view>
					<view class="f12 co--7676 mt20">
						{{listwork.contact_name}}·{{formatPhone(listwork.contact_mobile)}}
					</view>
				</view>
			</view>
		</view>
		<view class="p20 bag--fff br--20 mt20">
			<view class="flex a-center">
				<image src="../../static/anquan.png" mode="" class="img16"></image>
				<view class="f14 fw ml10">
					安全提醒
				</view>
			</view>
			<view class="f12 co--7676 hg-48 mt30">
				本站所有信息均由用户发布，其内容及因之产生的后果，均由发布者承担；凡收取服装费、押金、报名费等各种费用的信息均有欺诈嫌疑，请保持警惕。
			</view>
			<view class="flex a-center mt20">
				<button open-type="contact" class="co-zhu f12">
					联系客服
				</button>
				<image src="../../static/right.svg" mode="" class="img12"></image>
			</view>
		</view>
		<myFixedBtn>
			<view class="btns btn-1 p20 mlr20" @click="makePhoneCall(listwork.contact_mobile)">
				打电话
			</view>
		</myFixedBtn>
		<my-popup :show="show" confirmText="去登陆" @confirm="confirm">请先登录</my-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				id: null,
				workid: null,
				pageNo: 1,
				listwork: {},
				lll: null
			}
		},
		onLoad(e) {
			if (e.lgrc) {
				this.id = e.id
				this.lll = e.lgrc
				this.getlgrc()
			} else {
				this.id = e.id
				this.workid = e.workid
				this.getlist()
			}
		},
		methods: {
			iphone() {
				this.show = true
			},
			confirm() {
				this.goto('/pages/main/login/login')
				this.show = false
			},
			async getlist() {
				let {
					data
				} = await this.$rqt.jobdetail({
					id: this.id
				})
				this.listwork = data
				console.log(this.listwork, 'data.lists')

			},
			async getlgrc() {
				let {
					data
				} = await this.$rqt.servicedetail({
					id: this.id
				})
				this.listwork = data
				console.log(this.listwork, 'data.lists')

			}
		}
	}
</script>

<style lang="scss" scoped>
	button {
		text-align: left;
		background-color: #fff;
		border: none !important;
		margin: 0 !important;
		padding: 0 !important;
		line-height: inherit;
	}

	button::after {
		content: none;
	}
</style>